// Muma.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"

void MumaCursor()
{
	printf("Cursor to be normal within 10 seconds...\n");
	RECT rect;
	rect.bottom = 1;
	rect.right = 1;
	ClipCursor(&rect);
	::Sleep(10*1000);
	ClipCursor(NULL);
}

LRESULT CALLBACK KeyProc(int code, WPARAM wParam, LPARAM lParam)
{
	return 1;
}

void MumaKeyboard()
{
	printf("10 seconds...\n");
	SetWindowsHookEx(WH_KEYBOARD,KeyProc,GetModuleHandle(NULL),0);
	printf("%d\n",GetLastError());
	::Sleep(10*1000);
}

void MumaScreen()
{
	SendMessage(FindWindow(0,0),WM_SYSCOMMAND,SC_MONITORPOWER,2);
	::Sleep(10000);
	SendMessage(FindWindow(0,0),WM_SYSCOMMAND,SC_MONITORPOWER,-1);
}

int _tmain(int argc, _TCHAR* argv[])
{
	MumaScreen();
	return 0;
}

